package com.chinasofti;

public class Demo03 {

    public static void main(String[] args) {

    Person pe = new Person();
    Person pe1 = new Person(12);

    }

}
class Person{
    static {
        //静态代码块
        //只会运行一次，与方法一起运行,优先级最高
        System.out.println("我是静态代码块");
    }
    public Person() {
        System.out.println("无参构造器");
    }

    public Person(int a) {
        System.out.println("有参构造器");
    }
}